<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // let obj = {
        //     name:"laowang",
        //     age:18,
        //     sex:"男"
        // }

        // console.log(obj.name);
        // console.log(obj.age);
        // console.log(obj.sex);


        // 对象解构 需要和对象中属性名一致
        let {name,age,sex} = {
            name:"laowang",
            age:18,
            sex:"男"
        }

        // console.log(name);
        // console.log(age);
        // console.log(sex);

        // 数组或者对象

        // let arr = [1,2,3];

        // console.log(arr[0]);
        // console.log(arr[1]);
        // console.log(arr[2]);


        // 确定顺序
        let [b,a,c] = [1,2,3];

        console.log(a);
        console.log(b);
        console.log(c);





    </script>
</body>
</html>